package pt.ua.helpdesk.client;

import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.Widget;

/**
 * This class is responsible for assign a ticket to
 * an assistant
 * 
 * @author Amigos do Noddy
 */
public class TicketAssignOnClick implements ClickListener
{
	private Integer IDTicket;
	
	/**
	 * Constructor
	 * 
	 * @param idTicket Identifier of the ticket
	 */
	public TicketAssignOnClick(Integer idTicket)
	{		
		this.IDTicket = idTicket;
	}
	
	/**
	 * Handler for the click on the assign button
	 * This should be responsible for assign a ticket
	 * to an assistant
	 */
	public void onClick(Widget sender)
	{
		Default.loadComposite(new TicketAssign(IDTicket));
		System.out.print("Id ticket: "+IDTicket);
	}
}
